package com.ruoyi.project.tool.swagger.WorkerController;

import com.ruoyi.framework.aspectj.lang.annotation.SignatureValidation;
import com.ruoyi.framework.interceptor.annotation.RepeatSubmit;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.SysAgreement;
import com.ruoyi.project.system.service.ISysAgreementService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/mobileWorker/agreement")
public class WorkAgreementController {

    @Autowired
    private ISysAgreementService sysAgreementService;

    /**
     * 工人协议展示
     */
    @SignatureValidation
    @PostMapping("/queryAgreement")
    @ApiOperation("展示工人协议")
    @RepeatSubmit
    /**
     * 传 informationType = 2 工人
     * 传 agreementType   协议类型 数据字典查
     * */
    public AjaxResult queryAgreement(@RequestBody SysAgreement sysAgreement) {
        return AjaxResult.success("成功", sysAgreementService.showAgreement(sysAgreement));
    }

}
